package com.orcsun.lucy8;

import java.awt.EventQueue;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.almworks.sqlite4java.SQLiteException;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MainWin implements ActionListener {

	private MainFrame frmLucky;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainWin window = new MainWin();
					double   width   =   Toolkit.getDefaultToolkit().getScreenSize().getWidth(); 
		            double   height   =   Toolkit.getDefaultToolkit().getScreenSize().getHeight(); 
					window.frmLucky.setLocation( (int)   (width   -   window.frmLucky.getWidth())   /   2, 
		                                    (int)   (height   -   window.frmLucky.getHeight())   /   2);
					
					window.frmLucky.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 * @throws SQLiteException 
	 */
	public MainWin() throws SQLiteException {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 * @throws SQLiteException 
	 */
	private void initialize() throws SQLiteException {
		frmLucky = new MainFrame();
		frmLucky.setTitle("Lucky8 \u4FE1\u606F\u6570\u636E\u7EF4\u62A4\u5206\u6790\u7CFB\u7EDF");
		frmLucky.setBounds(100, 100, 1061, 726);
		frmLucky.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JMenuBar menuBar = new JMenuBar();
		frmLucky.setJMenuBar(menuBar);
		
		JMenu mnNewMenu = new JMenu("\u5206\u671F\u4ED8\u6B3E");
		menuBar.add(mnNewMenu);
		
		JMenuItem mntmNewMenuItem = new JMenuItem("New");
		mntmNewMenuItem.addActionListener(this);
		mnNewMenu.add(mntmNewMenuItem);
		
		JMenuItem mntmNewMenuItem_2 = new JMenuItem("Pay");
		mnNewMenu.add(mntmNewMenuItem_2);
		
		JMenuItem mntmNewMenuItem_1 = new JMenuItem("Search");
		mnNewMenu.add(mntmNewMenuItem_1);
		
		JMenu mnNewMenu_1 = new JMenu("\u6D41\u6C34\u8BB0\u5F55");
		menuBar.add(mnNewMenu_1);
		
		JMenuItem mntmNewMenuItem_3 = new JMenuItem("\u65B0\u589E");
		mnNewMenu_1.add(mntmNewMenuItem_3);
		
		JMenuItem mntmNewMenuItem_4 = new JMenuItem("\u67E5\u8BE2");
		mnNewMenu_1.add(mntmNewMenuItem_4);
		
		JMenu mnNewMenu_2 = new JMenu("\u7CFB\u7EDF\u8BBE\u7F6E");
		menuBar.add(mnNewMenu_2);
		
		JMenuItem menuItem = new JMenuItem("\u5907\u4EFD");
		mnNewMenu_2.add(menuItem);
	}
	public void actionPerformed(ActionEvent arg0) {
	}
}
